<?php
class Manageaccount_Controller_Manageaccount {
	public $template = "./manageaccount/views/manage.php";
	public function main(array $getVars, array $postVars){
		if(isset($_SESSION['users_username'])){
			$username = $_SESSION['users_username'];
			$account = new Manageaccount_Model_Account;
			$article = $account->getData($postVars, $username);
			$view = new Core_Model_View($this->template);
			$view->assign('article', $article);
		}
		else {
			echo '<meta http-equiv="Refresh" content="0;url='.SERVER_ROOT.'?login&page=login">';
		}
	}
	
}